home *** CD-ROM | disk | FTP | other *** search
- Path: news.magicnet.net!usenet
- From: catello@magicnet.net (Michael Catello)
- Newsgroups: comp.lang.c++
- Subject: Re: Microsoft Visual C++ vs. Borland C++
- Date: Thu, 04 Apr 1996 14:41:07 GMT
- Organization: MagicNet, Inc.
- Message-ID: <4k0n25$p1h@comet.magicnet.net>
- References: <4iria4$i76@granite.sentex.net> <4is07r$9cc@news1.h1.usa.pipeline.com> <4jacau$ibg@comet.magicnet.net> <315c2fff.72171602@sqarc.sq.com>
- NNTP-Posting-Host: pm2-02.magicnet.net
- X-Newsreader: Forte Free Agent 1.0.82
-
-
-
- willer@carolian.com (Steve Willer) wrote:
-
- >We don't have MSVC4 here, but I do have some legacy code that uses MFC
- >2, compiled with BC++. An example of the kinds of differences I'm
- >talking about are TDC vs. CDC. TDC is written as a true
- >resource-cleaning class, in that when you create it, it remembers the
- >handles of the stock objects it started with. So, if you call
- >something like myDC.SelectObject(myBrush), it will automatically clean
- >up. Plus, SelectObject is overridden for each TBitmap, TBrush, etc.,
- >and it takes a reference to the object rather than a pointer.
-
- You're right. Having to Select and de-Select DC objects is a
- programming burden and an easy way to get burned. Even knowing this,
- just last night I uncovered a leak where, in a report generation
- routine, I had incorrectly selected an object which would, after time,
- blow up. These idiosyncrasies carried over from the old SDK can be a
- nuisance but I strongly believe that by using MFC you will be exposed
- to more current Windows technologies instead of waiting for other
- compiler vendors to interpret and re-invent what microsoft has done.
-
- I enjoyed your detailed and thoughtful response.
- Regards,
-
- -Michael
-
-
-